#!/bin/bash
set_firewalld() {
systemctl stop firewalld &> /dev/null && echo -e "\e[32m防火墙关闭成功\e[0m"  ||  echo -e "\e[31m防火墙关闭失败\e[0m"
sleep 1
systemctl disable firewalld &> /dev/null && echo -e "\e[32m防火墙设置成功\e[0m"  ||  echo -e "\e[31m防火墙设置失败\e[0m"
sleep 1
sed -ri  's/enforcing/disabled/'  /etc/selinux/config
sleep 0.5
if [ $? -eq 0  ];then
   echo -e  "\e[32mSelinux成功关闭\e[0m" 
else
   echo -e  "\e[31mSelinux成功失败\e[0m" 
fi
sleep 0.5
}
